//@ sourceURL=CredentialsView.js
Ext.ns("CredentialsView");
CredentialsView = Ext.extend(Ext.Panel, {
    constructor : function(a) {
        Ext.applyIf(this, a);
        var all=this.initUIComponents();
        CredentialsView.superclass.constructor.call(this, {
            id : "CredentialsView",
            region : "center",
            layout : "border",
            border : false,
            iconCls : "menu-position",
            items : [all.yearGridPanel,all.yearGridSearchPanel]
        });
    },
    initUIComponents : function() {
         var yearGridComponents=new creategridview({
            topbar : {
                inputFormName : 'CredentialsForm',
                topbarAdd:{
                    hidden:false
                },
                topbarDel:{
                    hidden:false
                }
            },
            search : {
                items : [ {
                    style : "margin:5px 5px 5px 5px;",
                    text : "资格证书编号"
                }, {
                    columnWidth : 0.2,
                    xtype : "textfield",
                    name : "Q_credentialsNum_S_LK",
                    maxLength : 256
                } ]
            },
            grid : {
                title : "资格证书列表",
                rowActions:true,
                listUrl : __ctxPath + "/safecultruetrain/listCredentials.do?Q_credentialsId_L_EQ="+this.credentialsId,
                removeUrl : __ctxPath + "/safecultruetrain/deleteCredentials.do",
                fields : [ "id", 'years', 'institution', "credentialsId","credentialsNum", "credentialsVariety", "holdDate","validities"],
                columns : [ {
                    header : "id",
                    dataIndex : "id",
                    hidden : true
                },  
                {
                    header : "credentialsId",
                    dataIndex : "credentialsId",
                    hidden : true
                },
                {
                    header : "证书编号",
                    dataIndex : "credentialsNum",
                    width : 100
                }, {
                    header : "证书类型",
                    dataIndex : "credentialsVariety",
                    width : 70
                }, {
                    header : "持证日期",
                    dataIndex : "holdDate",
                    width : 70
                },
                {
                    header : "证件有效期",
                    dataIndex : "validities",
                    width : 100
                }]
            },
            formCfg : {
            	credentialsId  : this.credentialsId
            }
            
        });
         
         return yearGridComponents;
    }
});